Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: change HttpClient registration in DI #4

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

GerardSmit
Copy link
Contributor

Use IHttpClientFactory instead of registering a singleton HttpClient.

This way we let the runtime handle the HttpClient lifetime. When using a singleton HttpClient, the DNS can be cached. If for example MangaDex changes the DNS of their domain and MangaMagnet is running for a long period of time, this could be an issue. This is why I changed it to an IHttpClientFactory.

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for b56deba1 0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (b56deba) Report Missing Report Missing Report Missing
Head commit (3914dd7) 1881 921 48.96%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4) 7 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@DevYukine DevYukine merged commit 6f04e91 into develop Feb 10, 2024
4 checks passed
@GerardSmit GerardSmit deleted the refactor/http-client branch February 10, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants